package com.colde.salary.model;

import java.util.Date;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table(name="tb_user")
public class User {
	@Id
	private String userId;
	private String nickname;
	@Length(min = 6, max = 8, message = "密码长度为6-8位。")
	@Pattern(regexp = "[a-zA-Z]*", message = "密码不合法")
	private String pwd;
	private String sex;
	private String phone;
	private String role;
	private Date createtime;
	private Date updatetime;
}
